POV-Ray : Newsgroups : povray.newusers : Problem with colliding elements : Problem with colliding elements Server Time
29 Jul 2024 16:25:27 EDT (-0400)
  Problem with colliding elements  
From: Numb-C
Date: 9 Aug 2005 07:20:00
Message: <web.42f89130212c59aa726bd13c0@news.povray.org>
Hi all,

I just started with POV-Ray yesterday and created the code as seen on te
bottom of this message.

It creates 9 superellipsoid's with various heights.
I see two problems here and would like to know if these are bugs or
something I can easily resolve.

1) If the sides of the superellipsoid's collide with other elements I see
these flat parts probably indicating the curve of the superellipsoid's. But
I wanted them to just stay orange.

2) If the sides of the superellipsoid's collide with each other (or even if
you out them inside each other) you get those nasty black areas.

Note: I did not get this second effect when I used random colors for the
superellipsoid's.

Anyone care to comment on this and enlighten me ?

Code:

camera
{
 location <-4, 4, -4>
 look_at <4, 0, 4>
 up <0, .9, 0>
 right <1.6, 0, 0>
}

light_source
{
 <-75, 120, -25>
 rgb 1
}

plane
{
 y, 0
 pigment
 {
  checker
  rgb 1
  rgb <.9, .9, .9>
 }
}

plane
{
 x, 10
 pigment
 {
  rgb 1
 }
}

plane
{
 z, 10
 pigment
 {
  rgb 1
 }
}

#declare randomSeed = seed (2005);

#declare roundedBox =
 superellipsoid
 {
  <0.2, 0.2>
  pigment
  {
   rgb <1, .9, .8, .99>
  }
  finish
  {
   ambient 0.15
   diffuse 0.85
   phong 1
  }
  translate <0, 1.001, 0>
 };

#declare xCount = 0;
#declare zCount = 0;

#while (xCount < 3)
 #while (zCount < 3)
  object
  {
   roundedBox
   translate <xCount * 2.0001, 0, zCount * 2.0001>
   scale <1, rand(randomSeed) * 2, 1>
   pigment
   {
    rgb <1, .9, .8, .99>
   }
  }
     #declare zCount = zCount + 1;
 #end
 #declare zCount = 0;
 #declare xCount = xCount + 1;
#end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.